package com.learn.mvc.handler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class Demo03MappingMethodHandler {
    Logger logger = LoggerFactory.getLogger(this.getClass());
    // @RequestMapping(value = "/emp",method = RequestMethod.GET)
    @GetMapping("/emp")
    public String empGET() {
        logger.debug("GET 请求");
        return "target";
    }

    // @RequestMapping(value = "/emp", method = RequestMethod.POST)
    @PostMapping("/emp")
    public String empPOST() {
        logger.debug("POST 请求");
        return "target";
    }
}
